import request from '@/utils/request'

// 查询施工工程列表
export function listConstruction(query) {
  return request({
    url: '/cooperate/construction/list',
    method: 'get',
    params: query
  })
}

// 查询施工工程详细
export function getConstruction(id) {
  return request({
    url: '/cooperate/construction/' + id,
    method: 'get'
  })
}

// 新增施工工程
export function addConstruction(data) {
  return request({
    url: '/cooperate/construction',
    method: 'post',
    data: data
  })
}

// 修改施工工程
export function updateConstruction(data) {
  return request({
    url: '/cooperate/construction',
    method: 'put',
    data: data
  })
}

// 删除施工工程
export function delConstruction(id) {
  return request({
    url: '/cooperate/construction/' + id,
    method: 'delete'
  })
}

// 修改施工工程进度
export function editFinishRate(data) {
  return request({
    url: '/cooperate/construction/editFinishRate',
    method: 'post',
    data: data
  })
}

// 修改施工工程状态
export function editStatus(data) {
  return request({
    url: '/cooperate/construction/editStatus',
    method: 'post',
    data: data
  })
}

// 查询施工工程报告列表
export function listConsReport(query) {
  return request({
    url: '/cooperate/consReport/query',
    method: 'get',
    params: query
  })
}

// 查询施工工程报告详细
export function getConsReport(id) {
  return request({
    url: '/cooperate/consReport/' + id,
    method: 'get'
  })
}

// 删除施工工程报告
export function delConsReport(id) {
  return request({
    url: '/cooperate/consReport/' + id,
    method: 'delete'
  })
}